<!--
  description: Home
  @author: GuoSiYue
  date: 2021-11-10
 -->

<template>
    <div>
        <h2>Home: {{state.name}}</h2>
        <button @click="changeName()">修改name</button>
    </div>
</template>

<script>
    export default {
        name: "Home",
        props: {
            state: Object
        },
        setup(props) {
            const changeName = () => {
                props.state.name = 'home'
            }

            return {
                changeName
            }
        }
    }
</script>

<style scoped>

</style>